#include "eventhandler.h"


EventHandler::EventHandler(Control& parent, Control& sender, void* action) :
	m_parent(parent),
	m_sender(sender),
	m_action(action)
{
}


EventHandler::~EventHandler(void)
{
}

void EventHandler::invoke(void* args)
{
	void (*action)(Control& parent, Control& sender, void* action) = 
		static_cast<void (*)(Control& parent, Control& sender, void* action)>(m_action);

	action(m_parent, m_sender, args);
}
